2fd9a50a261248047a0ba8e4baefb087784a0359,cipango-annotations/src/main/java/org/cipango/annotations/AnnotationConfiguration.java,AnnotationConfiguration,configure,#WebAppContext#,41
Before Change
AnnotationParser parser = new AnnotationParser();
SipAppContext sac = context.getBean(SipAppContext.class);
if (sac.getSpecVersion() == SipAppContext.VERSION_10)
return;
// FIXME is decorator needed as all classes are parsed
sac.addDecorator(new AnnotationDecorator(context));
if (LOG.isDebugEnabled())
LOG.debug("parsing annotations");
SipApplicationAnnotationHandler sipApplicationAnnotationHandler = new SipApplicationAnnotationHandler(context);
parser.registerHandler(sipApplicationAnnotationHandler);
parser.registerHandler(new SipApplicationKeyAnnotationHandler(context));
parser.registerHandler(new SipListenerAnnotationHandler(context));
parser.registerHandler(new SipServletAnnotationHandler(context));
After Change
public void configure(WebAppContext context) throws Exception
{
SipAppContext sac = context.getBean(SipAppContext.class);
if (sac.getSpecVersion() != SipAppContext.VERSION_10)
{
if (LOG.isDebugEnabled())
LOG.debug("parsing SIP annotations");
SipApplicationAnnotationHandler sipApplicationAnnotationHandler = new SipApplicationAnnotationHandler(context);
_discoverableAnnotationHandlers.add(sipApplicationAnnotationHandler);
_discoverableAnnotationHandlers.add(new SipApplicationKeyAnnotationHandler(context));
_discoverableAnnotationHandlers.add(new SipListenerAnnotationHandler(context));
_discoverableAnnotationHandlers.add(new SipServletAnnotationHandler(context));
}
super.configure(context);